﻿using AexoManager.Datos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AexoManager.BussinesLogic
{
    public class BSInsumo : BSParent
    {
        public bool ExisteParteInsumo(Insumo unInsumo)
        {
            try
            {
                var retorno = context().InsumoObtener(unInsumo);
                if (retorno != null)
                    return true;
                else
                    return false;

            }
            catch (Exception)
            {
                throw;
            }
        }

        public List<ISPInsumo> ObtenerInsumos(Parte unaParte)
        {
            try
            {
                return context().InsumoObtenerDespiece(unaParte);
            }
            catch (Exception)
            {
                throw;
            }
        }
    }
}
